package com.coco.common.constant;

/**
 * @author minicoco
 * @version 1.0
 * @date 2021/7/14 22:44
 * 常量类
 */
public class Constant {

    /**
     * 返回状态码常量类
     */
    public static class ResultCode{

        public static final Integer DEFAULT_SUCCESS=0;

    }

    public static class AliyunKey{
        public static final String REGIONID="cn-hangzhou";
        public static final String ACCESSKEYID="LTAI5tEFQZCNyTfAUnoR5UrR";
        public static final String SECRET="xtS8WVb7CoS1KXlTGS1OrYw2XJpVuY";

    }

    /**
     * 商品表常量
     */
    public static  class GoodsConstant{

        /**
         * 单规格
         */
        public static final Integer SINGLE_SPECIFICATION=0;
        /**
         * 多规格
         */
        public static final Integer MULITI_SPECIFICATION=1;
        /**
         * 未回收状态
         */
        public static final Integer UN_RECYCLE=0;
        /**
         * 已回收
         */
        public static final Integer RECYCLE=1;
        /**
         * 销毁状态
         */
        public static final Integer DESTROY=2;
        /**
         * 上架状态
         */
        public static final Integer PUT_AWAY=1;
        /**
         * 下架
         */
        public static final Integer UN_AWAY=0;
        /**
         * 包邮
         */
        public static final Integer IS_POSTAGE=0;
        /**
         * 不包邮
         */
        public static final Integer UN_POSTAGE=1;
        /**
         * 售罄列表
         */
        public static final String SELL_OUT="findSelloutGoods";

        /**
         * 回收站列表
         */
        public static final String RECYCLE_GOODS = "findRecycleGoods";

    }

    public static class RedisKeyConstant{

        //redis秒杀商品键
        public static final String  GOODS_KEY_TEMPLATE="seck_goods:";

        //redis分布式锁键
        public static final String  GOODS_LOCK_TEMPLATE="lock_goods:";

        //秒杀成功用户Key
        public static final String  SOCK_USER_TEMPLATE="sock_user:";

        //商品限定数量MapKey
        public static final String  GOODS_NUM_TEMPLATE="goods_num:";

        //用户已购买数量模板
        public static final String  USER_TEMPLATE="user_buy:";

        //限定数量模板
        public static final String  NUMBER_OF_ACTIVE="numberOfActive:";
    }


    public static  class OrderKeyConstant{
        //用户idKey
        public static final String USERKEY="userId";

        //商品idKey
        public static final String GOODSKEY="goodsId";

        //订单idKey
        public static final String ORDERKEY="orderId";

        //获取截取值
        public static final int FIRST_KEY=1;

        //截取
        public static final String SUB_KEY=":";

        //已orderKey开头的key
        public static final String WITH_ORDER_KEY="orderKey";
        //已groupOrderKey开头的key
        public static final String WITH_GROUP_ORDER_KEY="user_order";
    }

    public static class RabbitMqKeyConstant{
        //同步Redis商品 生产者Key
        public static final String ADD_REDIS_KILL_GOODS_KEY = "addRedisKillGoods";

        //同步Redis订单 生产者Key
        public static final String SEC_ORDER_EXCHANGE_KEY = "secOrderExchange";

        //secGoodsNum
        public static final String SEC_GOODS_NUM_KEY = "secGoodsNum";

    }

    public static  class OrderStatus{
        //order状态 未支付
        public static final Integer STATUS_ONE=0;

        //order状态 已支付
        public static final Integer STATUS_TWO=1;

        //order状态 支付超时
        public static final Integer STATUS_THREE=2;
    }

    public static class BargainConstant{
        public static final String STORY_MAP = "yaoq";
        public static final String LOCK_KEY = "goods_lock:uid-?&&card-:";
        public static final String USER_KEY = "help_lock:uid-?&&card:";
        public static final String NO_BARGAIN = "你不能再砍了";
        public static final String NO_CREATE_TIME = "砍价未开始";
        public static final String NO_ENT_TIME = "砍价已经结束";


    }

    public static class BargainConstantMQ{
        public static final String bargainShopRollback = "bargainShopRollback";
        public static final String bargainOk = "bargainOk";
        public static final String bargainUserOk = "bargainUserOk";
        public static final String helpMeBargainUserAdd = "helpMeBargainUserAdd";
        public static final String userFirstBargain = "userFirstBargain";
        public static final String bargainRecordAdd = "bargainRecordAdd";

    }


    /**
     * 注册常量类
     */
    public static  class AdminRegisterConstant{

        /**
         * redisc存储验证码的 key 值
         */
        public static final String PRE_CODE="smscode_";
        /**
         * 当前用户已存在
         */
        public static final Integer ADMIN_EXIST=0;
        public static final String ADMIN_EXIST_MESSAGE="当前用户名已存在";
        /**
         *  登陆成功
         */
        public static final Integer ADMIN_LOGUIN_SUCCESS=1;
        public static final String ADMIN_LOGUIN_SMESSAGE="登陆成功";
        public static final String ADMIN_LOGUIN_ZVIEW="http://client1.com:9001/employess";
        public static final String ADMIN_LOGUIN_ERRONVIEW="http://ssoserver.com:9000/login.html";
        /**
         *  登陆失败
         */
        public static final Integer ADMIN_LOGUIN_ERRON=0;
        public static final String ADMIN_LOGUIN_EMESSAGE="登录失败";

        /**
         * 验证码过期
         */
        public static final Integer USER_LOGUIN_ERRON=0;
        public static final String USER_LOGUIN_EMESSAGE="验证码过期或手机号错误!";
        /**
         * 验证码不正确
         */
        public static final Integer ADMIN_YZM=0;
        public static final String ADMIN_YZM_MESSAGE="验证码不正确";
        /**
         * 注册成功
         */
        public static final Integer ADMIN_REGISTER=1;
        public static final String ADMIN_REGISTER_MESSAGE="注册成功";

        /**
         * 生成验证码
         */
        public static final Integer ADMIN_CODE_LENTH=10000;
        public static final Integer ADMIN_ONE_NUM=10;
        public static final Integer ADMIN_TWO_NUM=100;
        public static final Integer ADMIN_THREE_NUM=1000;
        public static final String ADMIN_THREE_NULL="";
    }

    /**
     * 祝福
     */
    public static class aliPay{
        public static final  String NOTIFY_URL = "http://41p77k1222.zicp.vip/aliPay/";
    }

    public static class GroupBuyConstant {

        /**
         * 是否为团长
         */
        public static final String IS_HEADER="0";
        public static final String NOT_HEADER="1";

        /**
         * 所需队列
         */
        //添加订单
        public static final String ADD_ORDER_QUEUE="groupOrder";
        public static final String ADD_ORDER_QUEUE_ONE="addGroupOrderOne";
        /**
         * 支付成功
         */
        public static final String PAY_SUCCESS = "TRADE_SUCCESS";
        /**
         *拼团状态
         */
        //进行中
        public static final String IN_HEAD = "0";
        //已完成
        public static final String IS_FINISH = "1";
        //已结束
        public static final String IS_END = "2";

        public static final String OVER_LIMIT = "您的购买次数已达到该商品的购买限制!";
        public static final String GROUP_BUY_OVER = "当前拼团已结束！";
        public static final String PERSON_NUM_ENOUGH = "参与人数已满";
        public static final String REDIS_GROUP_RECORD = "group_record:";
        public static final String GROUP_FAIL = "拼团未成功!";
        public static final String RETURN_MONEY = "returnMoney";
    }

    public static class Evaluate{
        //模糊查询
        public static final String IS_STATUS = "status";
        public static final String IS_SPUNAME = "spuName";
        public static final String IS_USERNAME = "userName";

        public static final  int  IS_TODAY= 1;   //今天
        public static final  int  IS_YESTERDAY= 2;//昨天
        public static final  int  IS_WEEK=3;//一周内
        public static final  int  IS_MONTH= 4;//本月
        public static final  int  IS_THIRTY_DAYS= 5;//30天内
        public static final  int  IS_YEAR= 6;//本年
    }

}
